

<%@page import="DataAccess.UserAccess"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript">
            function check_input(){
                var pass,confirm;
                pass = document.getElementsByName("txtPassword").item(0);
                confirm = document.getElementsByName("txtConfirm").item(0);
                if (pass.value == confirm.value)
                {
                    //window.location.href="/dangky";
                    return true;
                }
                else
                    alert("Passwords do not match");
                return false;
            }
        </script>

        <title>Create Account</title>
        <style type="text/css" title="currentStyle">
                        @import "css/main.css";
                        @import "css/menu.css";
                        @import "menu/menu_style.css";
                        .ui-widget{font-size:0.7em;}
                        .ui-helper-hidden-accessible{clip:auto;}
        </style>
        <%
            UserAccess user  = new UserAccess();
            if (user.checkExistedUser() == true)
                {
                   response.sendRedirect("Login.jsp");
                }
        %>
    </head>
    <body>
        
        <div id="text">
            Tạo mới người dùng
        </div>
        <div id="center">
        <form action="/account" method="post">
            <input type="hidden" name="action" value="createAdmin">
        <table width="422" align="center" id="form">
            <tr>
                            <td width="169">
                              <p>Username</p>
                            </td>
            <td width="241">
            <input name="txtUsername" type="text"/>
                            </td>
          </tr>
            <tr>
                <td>
                    <p>Password</p>
                </td>
                <td>
                    <input name="txtPassword" type="password" value="" />
                </td>
            </tr>
            <tr>
                <td>
                    <p>Nhập lại Password</p>
                </td>
                <td>
                    <input name="txtConfirm" type="password" value="" onblur="check_input()" />
                </td>
            </tr>
            <tr>
                <td>

                </td>
                <td>
                    <input name="btnRegister" type="submit" value="Tạo mới"/>
                </td>
            </tr>
        </table>
        </form>
        </div>
    </body>
</html>
